package com.zhilianbao.leyaogo.model.response.category;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by gyt on 2016/11/21
 */
public class CategoryInfo implements Parcelable{

    /**
     * classifyId : 27
     * parentId : 0
     * activityIcon : null
     * activitySign : null
     * classifyName : 海鲜水产
     * classifyPic :
     * classifySPic :
     * childNumber : 1
     * beClassifyId : null
     * type : 0
     * activityId : null
     */

    private int classifyId;     // 如果type = 0，则获取该值
    private int    parentId;
    private Object activityIcon;
    private Object activitySign;
    private String classifyName;
    private String classifyPic;
    private String classifySPic;
    private int    childNumber;
    private int beClassifyId;
    private int    type;        //类别 0表示商品分类 1表示专题 ,
    private int activityId;     // 如果type = 1， 则获取该值

    protected CategoryInfo(Parcel in) {
        classifyId = in.readInt();
        parentId = in.readInt();
        classifyName = in.readString();
        classifyPic = in.readString();
        classifySPic = in.readString();
        childNumber = in.readInt();
        beClassifyId = in.readInt();
        type = in.readInt();
        activityId = in.readInt();
    }

    public static final Creator<CategoryInfo> CREATOR = new Creator<CategoryInfo>() {
        @Override
        public CategoryInfo createFromParcel(Parcel in) {
            return new CategoryInfo(in);
        }

        @Override
        public CategoryInfo[] newArray(int size) {
            return new CategoryInfo[size];
        }
    };

    public int getClassifyId() {
        return classifyId;
    }

    public void setClassifyId(int classifyId) {
        this.classifyId = classifyId;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public Object getActivityIcon() {
        return activityIcon;
    }

    public void setActivityIcon(Object activityIcon) {
        this.activityIcon = activityIcon;
    }

    public Object getActivitySign() {
        return activitySign;
    }

    public void setActivitySign(Object activitySign) {
        this.activitySign = activitySign;
    }

    public String getClassifyName() {
        return classifyName;
    }

    public void setClassifyName(String classifyName) {
        this.classifyName = classifyName;
    }

    public String getClassifyPic() {
        return classifyPic;
    }

    public void setClassifyPic(String classifyPic) {
        this.classifyPic = classifyPic;
    }

    public String getClassifySPic() {
        return classifySPic;
    }

    public void setClassifySPic(String classifySPic) {
        this.classifySPic = classifySPic;
    }

    public int getChildNumber() {
        return childNumber;
    }

    public void setChildNumber(int childNumber) {
        this.childNumber = childNumber;
    }

    public int getBeClassifyId() {
        return beClassifyId;
    }

    public void setBeClassifyId(int beClassifyId) {
        this.beClassifyId = beClassifyId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(classifyId);
        dest.writeInt(parentId);
        dest.writeString(classifyName);
        dest.writeString(classifyPic);
        dest.writeString(classifySPic);
        dest.writeInt(childNumber);
        dest.writeInt(beClassifyId);
        dest.writeInt(type);
        dest.writeInt(activityId);
    }
}
